import { defineStore } from 'pinia';

export const useAllStore = defineStore('all', {
    actions: {
        setCourseContainerInfo(key, value) {
            this.courseContainerInfo[key] = value
        },
        setCoursesVue(key, value) {
            this.coursesVue[key] = value
        },
        setDialog(value) {
            this.dialog = value
        }
    },


    state: () => ({
        // 课程容器信息
        courseContainerInfo: {
            id: null,
            name: "",
            unitName: "",
            studentsInfo: [],
            filters:[]
        },
        coursesVue: {
            topChoose: 0
        },

        // 对话框 空值为全部关闭
        dialog: ""
    }),

    getters: {},
})
